﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WJP.Utils.CodeTimer;

namespace IOCSample
{
    public abstract class RunnerBase
    {
        internal int Iteration { get; } = Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["Iteration"] ?? "10000");

        internal void Time(Action action)
        {
            CodeTimer.Time(Name, Iteration, action);
        }

        protected abstract string Name { get; }
    }
}
